﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ZoneManagement.ascx.cs" Inherits="Framework.Module.CMS.Admin.Zones.ZoneManagement" %>
<%@ Register Assembly="Framework.Library" Namespace="Framework.Library.Controls" TagPrefix="cc1" %>
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="Framework.FilePickerControl" Namespace="Framework.FilePicker" TagPrefix="cc2" %>
<asp:UpdatePanel ID="uppanelDistribution" runat="server" UpdateMode="Conditional"
    RenderMode="Inline">
    <triggers>
        <asp:AsyncPostBackTrigger ControlID="lstZones" EventName="SelectedNodeChanged" />        
    </triggers>
    <contenttemplate>
    <table class="content" border="0" width="100%" cellpadding="2" cellspacing="2">    
        <tr>
            <td class="postheader" width="30%" align="left" valign="top">
                <asp:TreeView ID="lstZones" runat="server"  ExpandImageUrl="/Administrator/Resource/Images/TreeView/col.gif" CollapseImageUrl="/Administrator/Resource/Images/TreeView/exp.gif" NodeStyle-CssClass="TreeNode" NodeIndent="15" NoExpandImageUrl="/Administrator/Resource/Images/TreeView/noexp.gif"
                    HoverNodeStyle-CssClass="HoverTreeNode" SelectedNodeStyle-CssClass="SelectedTreeNode" OnSelectedNodeChanged="lstZones_SelectedIndexChanged" >                   
                    </asp:TreeView>
            </td>           
            <td class="post" width="70%" align="left" valign="top">
                <table class="content" width="100%" border="0" cellpadding="0" cellspacing="1">
                    <tr>
                            <td class="header1" colspan="2" align="left">
                                <asp:Label ID="lblCommandName" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" class="header2" height="18">
                                <asp:Label ID="lblStatusUpdate" runat="server"></asp:Label></asp:Label>
                            </td>
                        </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left" colspan="2">                            
                            <asp:Repeater ID="dtgZones" runat="server" OnItemCommand="dtgZones_ItemCommand">
                                <HeaderTemplate>
                                    <table class="content" cellspacing="1" cellpadding="0" width="100%">                                        
                                        <tr>
                                            <td class="header2" style="height: 19px" align="left" width="50">
                                                ID</td>
                                            <td class="header2" style="height: 19px" align="left">
                                                Name</td>
                                            <td class="header2" align="left" style="height: 19px" width="60">
                                                <asp:Button ID="cmdUpdateOrder" runat="server" Width="60px" Text="Thứ tự" CommandName="updateOrder" CssClass="pbutton"></asp:Button></td>                
                                        </tr>
                                </HeaderTemplate>
                                <ItemTemplate>
                                        <tr>
                                            <td class="post" align="left">
                                                <%# Eval("Zone_ID")%><asp:HiddenField ID="hfId" Value='<%# Eval("Zone_ID")%>' runat="server" /></td>
                                            <td class="post" align="left">
                                                <asp:LinkButton ID="NameEdit" runat="server" CommandName="editcontrol" CommandArgument='<%# Eval("Zone_ID") %>' Text='<%# Eval("Zone_Name") %>' />
                                            </td>
                                            <td class="post" align="left">
                                                <asp:DropDownList ID="dropOrder" runat="server" Width="60px"></asp:DropDownList>
                                            </td>               
                                        </tr>
                                </ItemTemplate>
                                <FooterTemplate>                                        
                                    </table>
                                </FooterTemplate>
                            </asp:Repeater>                           
                        </td>
                    </tr>
                    <tr>                    
                        <td class="postheader" width="25%" align="left">
                            Tên chuyên mục</td>
                        <td class="post" width="75%" align="left">
                            <asp:TextBox ID="txtName" runat="server" Width="265"></asp:TextBox><asp:TextBox ID="txtID"
                                runat="server" Enabled="False" Visible="False" Width="10px"></asp:TextBox></td>
                    </tr>
                     <tr>
                        <td class="postheader" width="25%" align="left">
                            Alias</td>
                        <td class="post" width="75%" align="left">
                            <asp:TextBox ID="txtZoneAlias" runat="server" Width="265"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            Thuộc chuyên mục</td>
                        <td class="post" width="75%" align="left">
                            <asp:DropDownList ID="dropZones" runat="server" Width="266">
                            </asp:DropDownList></td>
                    </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            Url (thực)</td>
                        <td class="post" width="75%" align="left">
                            <asp:DropDownList ID="dropRealUrl" runat="server" Width="266">
                            </asp:DropDownList></td>
                    </tr>                   
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            Ảnh hiển thị</td>
                        <td class="post" width="75%" align="left">
                            <cc2:FilePicker ID="fpkAlbumAvatar" runat="server" Width="300" fpImageURL="/FilePicker/Images/browse.gif" fpPopupURL="/FilePicker/TUFilePicker.aspx" fpUploadDir="/Images/HomePage/"></cc2:FilePicker>
                        </td>
                    </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            Hiển thị menu ngang</td>
                        <td class="post" width="75%" align="left">
                            <asp:CheckBox ID="chkTabMenu" runat="server" /></td>
                    </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            Hiển thị menu trái</td>
                        <td class="post" width="75%" align="left">
                            <asp:CheckBox ID="chkNavbar" runat="server" /></td>
                    </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            Hiển thị menu trên</td>
                        <td class="post" width="75%" align="left">
                            <asp:CheckBox ID="chkTop" runat="server" /></td>
                    </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            Hiển thị menu trái dưới</td>
                        <td class="post" width="75%" align="left">
                            <asp:CheckBox ID="chkLeftBottom" runat="server" /></td>
                    </tr>
                    <tr>
                        <td class="postheader" width="25%" align="left">
                            Hiển thị menu phải dưới</td>
                        <td class="post" width="75%" align="left">
                            <asp:CheckBox ID="chkRightBottom" runat="server" /></td>
                    </tr>                    
                    <tr>
                        <td class="postfooter" colspan="2" valign="middle" align="center">
                        <asp:Button ID="cmdUpdate" runat="server" CssClass="pbutton" Text="Cập nhật" Width="79px"
                        OnClick="cmdUpdate_Click" />
                    <asp:Button ID="cmdAdd" runat="server" CssClass="pbutton" Text="Thêm" Width="79px"
                        OnClick="cmdAdd_Click" />
                    <asp:Button ID="cmdDel" runat="server" CausesValidation="False" CssClass="pbutton"
                        Text="Xóa" Width="79px" OnClick="cmdDel_Click" />
                    <asp:Button ID="cmdEmpty" runat="server" CausesValidation="False" CssClass="pbutton"
                        Text="Hủy" Width="79px" OnClick="cmdEmpty_Click" /><br />
                        </td>                    
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </contenttemplate>
</asp:UpdatePanel>